package cn.edu.nit.sys.mapper;

import cn.edu.nit.sys.entity.Notice;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface NoticeMapper extends BaseMapper<Notice> {

    Page<Notice> getNoticeList(String title, String start, String end, Page<Notice> page);

    @Insert("insert into sys_notice_log(id, type, target, user_id, status, fid) " +
            "values (#{id}, #{type}, #{target}, #{userId}, #{status}, #{bizcId})")
    void addNoticeLog(String id, String type, String target, String userId, String status, String bizcId);

    List<String> getRoles(String[] targets);
}
